package model;


/**
 * Write a description of class Product here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Product
{
    private static long serialCounter = 0;
    
    
    private String barcode;
    private String productName;
    private String productType;
    private double price;
    private String location;
    private String serialNumber;
    private boolean availability;
    private int amount;

   
    public Product(String barcode, String productName, String productType, double price, String location, int amount)
    {
        this.barcode = barcode;
        this.productName = productName;
        this.productType = productType;
        this.price = price;
        this.location = location;
        serialNumber = createSerial();
        this.availability = true;
        this.amount = amount;
    }
     public static synchronized String createSerial()
        {
            return String.valueOf(serialCounter++);
        }

    public String getBarcode()
    {
        return barcode;
    }
    
    public String getProductName()
    {
        return productName;
    }
    
    public String getProductType()
    {
        return productType;
    }
    
    public double getPrice()
    {
        return price;
    }
    
    public String getLocation()
    {
        return location;
    }
    
    public String getSerialNumber()
    {
        return serialNumber;
    }
    
    public boolean getAvailability()
    {
        return availability;
    }
    
    public int getAmount()
    {
        return amount;
    }
    
    public void setBarcode(String barcode)
    {
       this.barcode = barcode;
    }
    
    public void setProductName(String productName)
    {
       this.productName = productName;
    }
    
    public void setProductType(String productType)
    {
       this.productType = productType;
    }
    
    public void setPrice(double price)
    {
       this.price = price;
    }
    
    public void setLocation(String location)
    {
       this.location = location;
    }
    
    public void setSerialNumber(String serialNumber)
    {
       this.serialNumber = serialNumber;
    }
    
    public void setAvailability(boolean availability)
    {
       this.availability = availability;
    }
    
    public void setAmount(int amount)
    {
        this.amount = amount;
    }
}
